abstract interface class AuthException implements Exception {
  String get message;
  String get code;
}

// 具体实现示例
class EmailAlreadyInUseException implements AuthException {
  @override
  final String message = 'Email already in use';
  @override
  final String code = 'email-already-in-use';
}

class InvalidCredentialsException implements AuthException {
  @override
  final String message = 'Invalid credentials';
  @override
  final String code = 'invalid-credentials';
}

class GenericAuthException extends AuthException {
  GenericAuthException({required String message});

  @override
  String get code => throw UnimplementedError();

  @override
  String get message => throw UnimplementedError();
}
